<template>
  <div class="home">
    <div class="header">
      <Header />
    </div>
    <div class="main">
      <Main />
    </div>
  </div>
</template>

<script>
export default {
  name: 'Home',
  data () {
    return {
      msg: '智能应用展示系统'
    }
  },
  computed: {
    toast () { return this.$store.state.toast },
    model () { return this.$route.name }
  },
  watch: {
    toast (val) {
      if (val) {
        this.$message({
          message: val,
          type: 'warning'
        })
      }
    },
    model (val) {
      this.$store.commit('updateModel', val)
    }
  },
  components: {
    Header: () => import('@/components/header'),
    Main: () => import('@/components/main')
  }
}
</script>
